package com.module.antiFake.manager;

import java.util.List;

import org.hibernate.Session;

import base.dao.GenericHibernateDao;
import base.manager.GenericHibernateManager;

import com.module.antiFake.dao.AntiFakeFileDao;
import com.module.antiFake.vo.AntiFakeFile;


public class AntiFakeFileManager extends GenericHibernateManager<AntiFakeFile,Integer>{
	private AntiFakeFileManager(){
		
	}
	private static AntiFakeFileManager service;
	private AntiFakeFileDao dao = AntiFakeFileDao.getInstance();
	public synchronized static AntiFakeFileManager getInstance(){
		if(service == null){
			service = new AntiFakeFileManager();
		}
		return service;
	}	
	
	public List<AntiFakeFile> getUrl(int complainId ) throws Exception{
		Session session = this.getSession();
		try{
			return dao.getUrl(session,complainId);
		}catch (Exception e) {
			throw e;
		}finally{
			this.closeSession();
		}
	}



	@Override
	public GenericHibernateDao<AntiFakeFile, Integer> getDao() {
		return dao;
	}
}
